import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
import { DeptComponent } from "./pages/dept/dept.component";
import { RoleComponent } from "./pages/role/role.component";
import { MenuComponent } from "./pages/menu/menu.component";
import { EmployeeComponent } from "./pages/employee/employee.component";
import { LoginComponent } from "./pages/login/login.component";
import { GroupComponent } from "./pages/group/group.component";

const routes: Routes = [
    { path: '', pathMatch: 'full', redirectTo: '/group'},
    { path: 'login', component: LoginComponent },
    { path: 'dept', component: DeptComponent, pathMatch: 'full' },
    { path: 'role', component: RoleComponent, pathMatch: 'full'},
    { path: 'menu', component: MenuComponent, pathMatch: 'full'},
    { path: 'employee', component: EmployeeComponent, pathMatch: 'full'},
    { path: 'group', component: GroupComponent, pathMatch: 'full'},
]
@NgModule({
    imports: [RouterModule.forRoot(routes)],
    exports: [RouterModule]
  })
  export class AppRoutingModule { }